import http from '@/api';
import { ADMIN_PREFIX_V2 } from '@/api/helper/prefix';

//获取物料类别
export const getMaterialTypeList = params => {
  return http.get(ADMIN_PREFIX_V2 + `/basic_material_type/list`, params);
};

// 创建物料类别
export const createMaterialType = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_material_type/create`, params);
};

// 删除物料类别
export const deleteMaterialType = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_material_type/delete`, params);
};

// 更新物料类别
export const updateMaterialType = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_material_type/update`, params);
};

// 修改物料类别状态
export const updateMaterialTypeStatus = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_material_type/update-state`, params);
};

//批量新增物料类别
export const batchCreateMaterialType = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_material_type/batch-create`, params);
};
